<?php

class Menu
{

    public function setId( $int )
    {
        $this->_id = (int) $int;
    }
    public function getId()
    {
        return $this->_id;
    }

    public function setMenu( $string )
    {
        $this->_menu = $string;
    }
    public function getMenu()
    {
        return $this->_menu;
    }

    public function setMenuItem( $string )
    {
        $this->_menuItem = $string;
    }
    public function getMenuItem()
    {
        return $this->_menuItem;
    }

    public function setAction( $string )
    {
        $this->_action = $string;
    }
    public function getAction()
    {
        return $this->_action;
    }

    public function setAllowRole( $string ) 
    {
        $this->_allowRole = $string;
    }
    public function getAllowRole() 
    {
        return $this->_allowRole;
    }

    public function setDenyRole( $string ) 
    {
        $this->_denyRole = $string;
    }
    public function getDenyRole() 
    {
        return $this->_denyRole;
    }

    public function setFocus( $boolean ) 
    {
        $this->_focus = $boolean;
    }

    //================================================================================
    // extension
    //================================================================================

    public function isFocus()
    {
        return (true===$this->_focus);
    }

    public function isAllow()
    {
        return true;
    }

    public function getUrl(&$controller)
    {
        return $controller->createUrl($this->_action);
    }

}